package edu.hitsz.aircraft;

import edu.hitsz.application.ImageManager;
import edu.hitsz.application.MusicThread;
import edu.hitsz.application.Main;
import edu.hitsz.prop.*;
import edu.hitsz.aircraft.shoot.SkewShoot;

import java.util.List;
import java.util.Random;

/**
 * BOSS敌机 简单创建了一下, 没有使用
 *
 * @author CsCN
 */
public class BossEnemy extends AbstractEnemy {

    public BossEnemy(int locationX, int locationY, int speedX, int speedY, int hp) {
        super(locationX, locationY, speedX, speedY, hp, 6, 30, 1);
    }
    @Override
    public List<AbstractProp> enemyVanish() {
        if (Main.musicFlag) {
            Main.bgmThread.terminate();
            Main.bgmThread = new MusicThread("bgm.wav", true);
            Main.bgmThread.start();
        }
        BossEnemyFactory.bossExists = false;

        List<AbstractProp> props = super.enemyVanish();
        // Blood Bomb Bullet三种情况等可能
        Random random = new Random();
        PropFactory propFactory;
        switch (random.nextInt(3)) {
            case 0:
                propFactory = new BloodPropFactory();
                break;
            case 1:
                propFactory = new BombPropFactory();
                break;
            default:
                propFactory = new BulletPropFactory();
                break;
        }
        props.add(propFactory.createProp(this));
        return props;
    }

}
